<?php 
// 用途，抓网站的数据
// 例子
//  http://php.ap.com/re/https://www.baidu.com/baidu?wd=hello
// 跳转 https://www.baidu.com/baidu?wd=hello
// 其中 $uri = $_SERVER['REQUEST_URI'] 为 /re/https://www.baidu.com/baidu?wd=hello

/**
伪静态的配置方式
location /re {
	if (!-e $request_filename){
		rewrite  ^(.*)$  /dev/redirect302.php?s=$1  last;   break;
	}
}
*/
$uri = $_SERVER['REQUEST_URI'] ;
$dst = substr($uri,4);

if ( strlen($dst)< 20) {
  echo "长度不够!";//echo "长度不够!";
  return;
}
//echo '<br>提取的网址为 ' . $dst;
//header('Location: http://www.mzyq.com/');
header('Location: ' . $dst );
?>
